package nl.rainbowsheep.reisorg.rest.service.repository;

import java.util.List;
import nl.rainbowsheep.reisorg.rest.service.model.Trip;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * repository for trips
 */
public interface TripRepository extends JpaRepository<Trip, Long> {

    List<Trip> findByIsPredefined(boolean isPredefined);

    Trip findByIsPredefinedAndId(boolean isPredefined, long id);

    List<Trip> findByIsPredefinedAndMinPersonsLessThanEqualAndMaxPersonsGreaterThanEqual(boolean isPredefined, int minPersons, int maxPersons);

    List<Trip> findByMinPersonsLessThanEqualAndMaxPersonsGreaterThanEqual(int minpersons, int maxpersons);

    List<Trip> findByCustomerId(long customerId);

//    List<Trip> findByIsPredefinedAndMinPersonsLessThanEqualAndMaxPersonsGreaterThanEqualAndAccommodationsCountryIdIn(boolean isPredefined, int minPersons, int maxPersons, List<Long> countriesIds);

}
